package cn.edu.scau.cmi.luochenghao.chapter07;

interface Advertisement{
	public void showAdvertisement();
	public String getCorpName();
}

class AdvertisementBoard{
	public void show(Advertisement adver) {
		System.out.println(adver.getCorpName()+"的广告词如下：");
		adver.showAdvertisement();
	}
}

class WhiteCloudCrop implements Advertisement {
	public void showAdvertisement() {
		System.out.println("@@@@@@@@@@@@@@@@@@@@@@");
		System.out.printf("飞机中的战斗机，哎yes！\n");
		System.out.println("@@@@@@@@@@@@@@@@@@@@@@");
	}
	public String getCorpName() {
		return "白云有限公司";
	}
}

class BlackLandCrop implements Advertisement {
	public void showAdvertisement() {
		System.out.println("**************");
		System.out.printf("劳动是爹\n土地是妈\n");
		System.out.println("**************");	
	}
	public String getCorpName() {
		return "黑土集团";
	}
}

public class Example7_5 {

	public static void main(String[] args) {
		AdvertisementBoard board=new AdvertisementBoard();
		board.show(new BlackLandCrop());
		board.show(new WhiteCloudCrop());
	}

}
